package main

import (
	"fmt"
	"time"
)

func main() {
	c := make(chan int)
	go func() {
		defer fmt.Println("go 结束")
		fmt.Println("go...")
		c <- 666                    //n := <-c只会阻塞到此
		time.Sleep(1 * time.Second) //
	}()

	n := <-c
	fmt.Println("n=", n)
	fmt.Println("main end")
}
